package com.procurement.bidding.mapper;

import com.procurement.bidding.domain.PcmBiddingDemandMain;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Map;

/**
 * 招标需求主Mapper接口
 * 
 * @author ruoyi
 * @date 2023-11-21
 */
@SuppressWarnings("all")
public interface PcmBiddingDemandMainMapper 
{
    //查询招标需求
    public List<PcmBiddingDemandMain> showAllLj(@Param("demandNumber") String demandNumber);

    //查询采购明细
    public List<Map<String,Object>> showAllMx(Map<String,Object> map);



    //根据项目ID查询需求信息
    public List<Map<String,Object>> findAllByProjectID(@Param("projectID")Integer projectID);


    //创建招标需求
    public Integer insertDemandMain(Map<String,Object> map);

    //创建需求时向中间表插入关联数据
    public Integer addDemandDetail(@Param("projectID") Integer projectID, @Param("detailIDs") List<Integer> detailIDs);

    //跟据明细ID修改采购申请行状态
    public Integer updateDemandLineStatus(@Param("list") List<Integer> list);

    //更新招标需求更新时间
    public Integer updateTime(Map<String,Object> map);

    //删除招标需求
    public Integer delDemandMain(@Param("projectIDs") List<Integer> projectIDs);

    //删除招标需求中的采购明细
    public Integer delDemandDetail(@Param("delDetailIds") List<Integer> delDetailIds , @Param("projectID") Integer projectID);

}
